<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>Hello H5+</title>
		<script type="text/javascript">
			var pusher = null
// H5 plus事件处理  
function plusReady() {
				// 创建直播推流控件  
	// 			pusher = new plus.video.LivePusher('pusher', { url: 'rtmp://testlivesdk.v0.upaiyun.com/live/upyunb' })
				
	// 			// pusher.setOptions({ url:'rtmp://41755441' })
	// pusher.start(function(){
	// 		console.log('Start pusher success!');
	// 	}, function(e){
	// 		console.log('Start pusher failed: '+JSON.stringify(e));
	// 	});
	// }
		pusher = plus.video.createLivePusher('pusher', {
				url:'rtmp://testlivesdk.v0.upaiyun.com/live/upyunb',
				top:'100px',
				left:'0px',
				width: '100%',
				height: '300px',
				position: 'static'
			})
plus.webview.currentWebview().append(pusher)
	setTimeout(()=>{
		
		pusher.snapshot(function(e){
				console.log('snapshot success: '+JSON.stringify(e))
}, function(e) {
				console.log('snapshot error: '+JSON.stringify(e))
})
	},1000)
	// 监听状态变化事件  
	pusher.addEventListener('statechange', function(e) {
					console.log('statechange: ' + JSON.stringify(e))
	}, false)
}
			document.addEventListener('plusready', plusReady, false)
		</script>
	</head>
	<body>
		<br />
		<div id="pusher" style="width:300px;height:400px;background-color:#000000;margin:auto"></div>
	</body>
</html>